package cn.seaboot.admin.flake.service;

import cn.seaboot.admin.flake.bean.FlakeParamMapping;
import cn.seaboot.admin.flake.dao.FlakeParamMappingDao;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Service
 * 参数字段映射 [T_FLAKE_PARAM_MAPPING]
 *
 * @author Mr.css on 2018-6-20
 */
@Service
public class FlakeParamMappingService {

    @Resource
    private FlakeParamMappingDao flakeParamMappingDao;

    /**
     * 增
     *
     * @param pojo pojo
     * @return affected rows
     */
    public int insert(FlakeParamMapping pojo) {
        return flakeParamMappingDao.insert(pojo);
    }

    /**
     * 删
     *
     * @param id id
     * @return affected rows
     */
    public int deleteById(String id) {
        return flakeParamMappingDao.deleteById(id);
    }

    /**
     * 改
     *
     * @param pojo pojo
     * @return affected rows
     */
    public int updateById(FlakeParamMapping pojo) {
        return flakeParamMappingDao.updateSampleById(pojo);
    }

    /**
     * 查
     *
     * @param id id
     * @return pojo
     */
    public FlakeParamMapping queryById(String id) {
        return flakeParamMappingDao.selectById(id);
    }

    /**
     * 查列表
     *
     * @param parameterMap id
     * @return listMap
     */
    public List<FlakeParamMapping> queryList(String parameterMap) {
        return flakeParamMappingDao.selectList(parameterMap);
    }
}